package com.zhangyongyi.carhome.entity.greendao;

import android.database.sqlite.SQLiteDatabase;

import java.util.Map;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.AbstractDaoSession;
import de.greenrobot.dao.identityscope.IdentityScopeType;
import de.greenrobot.dao.internal.DaoConfig;

import com.zhangyongyi.carhome.entity.greendao.NewesListEntity;
import com.zhangyongyi.carhome.entity.greendao.FocusimgList;
import com.zhangyongyi.carhome.entity.greendao.PersuaderList;
import com.zhangyongyi.carhome.entity.greendao.ForumList;
import com.zhangyongyi.carhome.entity.greendao.HotList;
import com.zhangyongyi.carhome.entity.greendao.EpisodeList;

import com.zhangyongyi.carhome.entity.greendao.NewesListEntityDao;
import com.zhangyongyi.carhome.entity.greendao.FocusimgListDao;
import com.zhangyongyi.carhome.entity.greendao.PersuaderListDao;
import com.zhangyongyi.carhome.entity.greendao.ForumListDao;
import com.zhangyongyi.carhome.entity.greendao.HotListDao;
import com.zhangyongyi.carhome.entity.greendao.EpisodeListDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see de.greenrobot.dao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig newesListEntityDaoConfig;
    private final DaoConfig focusimgListDaoConfig;
    private final DaoConfig persuaderListDaoConfig;
    private final DaoConfig forumListDaoConfig;
    private final DaoConfig hotListDaoConfig;
    private final DaoConfig episodeListDaoConfig;

    private final NewesListEntityDao newesListEntityDao;
    private final FocusimgListDao focusimgListDao;
    private final PersuaderListDao persuaderListDao;
    private final ForumListDao forumListDao;
    private final HotListDao hotListDao;
    private final EpisodeListDao episodeListDao;

    public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        newesListEntityDaoConfig = daoConfigMap.get(NewesListEntityDao.class).clone();
        newesListEntityDaoConfig.initIdentityScope(type);

        focusimgListDaoConfig = daoConfigMap.get(FocusimgListDao.class).clone();
        focusimgListDaoConfig.initIdentityScope(type);

        persuaderListDaoConfig = daoConfigMap.get(PersuaderListDao.class).clone();
        persuaderListDaoConfig.initIdentityScope(type);

        forumListDaoConfig = daoConfigMap.get(ForumListDao.class).clone();
        forumListDaoConfig.initIdentityScope(type);

        hotListDaoConfig = daoConfigMap.get(HotListDao.class).clone();
        hotListDaoConfig.initIdentityScope(type);

        episodeListDaoConfig = daoConfigMap.get(EpisodeListDao.class).clone();
        episodeListDaoConfig.initIdentityScope(type);

        newesListEntityDao = new NewesListEntityDao(newesListEntityDaoConfig, this);
        focusimgListDao = new FocusimgListDao(focusimgListDaoConfig, this);
        persuaderListDao = new PersuaderListDao(persuaderListDaoConfig, this);
        forumListDao = new ForumListDao(forumListDaoConfig, this);
        hotListDao = new HotListDao(hotListDaoConfig, this);
        episodeListDao = new EpisodeListDao(episodeListDaoConfig, this);

        registerDao(NewesListEntity.class, newesListEntityDao);
        registerDao(FocusimgList.class, focusimgListDao);
        registerDao(PersuaderList.class, persuaderListDao);
        registerDao(ForumList.class, forumListDao);
        registerDao(HotList.class, hotListDao);
        registerDao(EpisodeList.class, episodeListDao);
    }
    
    public void clear() {
        newesListEntityDaoConfig.getIdentityScope().clear();
        focusimgListDaoConfig.getIdentityScope().clear();
        persuaderListDaoConfig.getIdentityScope().clear();
        forumListDaoConfig.getIdentityScope().clear();
        hotListDaoConfig.getIdentityScope().clear();
        episodeListDaoConfig.getIdentityScope().clear();
    }

    public NewesListEntityDao getNewesListEntityDao() {
        return newesListEntityDao;
    }

    public FocusimgListDao getFocusimgListDao() {
        return focusimgListDao;
    }

    public PersuaderListDao getPersuaderListDao() {
        return persuaderListDao;
    }

    public ForumListDao getForumListDao() {
        return forumListDao;
    }

    public HotListDao getHotListDao() {
        return hotListDao;
    }

    public EpisodeListDao getEpisodeListDao() {
        return episodeListDao;
    }

}
